In the Los Angeles county healthcare system, low-income, predominantly Latino patients with diabetes face significant barriers to accessing primary care and the health education they need. The most desperate come to the emergency department (ED) for management of their diabetes, but the overcrowded ED is not equipped to provide this chronic care. As a result, these patients are amongst the sickest in the nation with mortality rates nearly double that of other populations, and HbA1C levels in the take action range (mean HbA1C=8.8%). Promising interventions have been developed, but have not been widely implemented due to high cost and personnel requirements. . Inspired by the recent successes of mHealth, the TExT-MED intervention (Trial to Examine Text-Based mHealth for Emergency department patients with Diabetes) was designed. Patients will receive daily text messages focused on motivational challenges, contests, diabetes education, and appointment/medications reminders. The initial curriculum content will be created from National Diabetes Education Program materials with special emphasis on knowledge gaps identified in prior studies (e.g. signs of hypoglycemia). A small pilot study will be conducted prior to the RCT evaluate technical success and ensure appropriateness of message frequency and content. The patients in this pilot study will participate in focus groups which will be analyzed using standard qualitative techniques to refine the TExT-MED curriculum. The project will culminate in a randomized controlled trial of 150 patients with poorly controlled diabetes (HbA1C e8%) randomized to usual care or TExT-MED. At enrollment, 3 and 6 months, multiple clinical measures will be recorded: HbA1C, diabetes knowledge, self-reported health, weight, medication compliance, physical activity, food choices, quality of life and health care utilization. This innovative, easily adaptable and low-cost solution has potential to improve glycemic control, knowledge and healthy lifestyle choices in a patient population that has been difficult to reach and complicated to treat.